﻿using System;
using System.Collections.Generic;
using System.Text;

namespace C11_Ex02_1
{
    public class Cell
    {
        private String m_CellId;
        private bool m_CellIsRevealed;
        private BoardPosition m_Position;

        public Cell(BoardPosition i_Position)
        {
            m_CellId = null;
            m_CellIsRevealed = false;
            m_Position = i_Position;
        }

        public BoardPosition CellPosition
        {
            get { return m_Position;}
        }

        public void FlipCardInCell()
        {
            m_CellIsRevealed = !m_CellIsRevealed;
        }

        public String CellValue
        {
            set { m_CellId = value; }
            get { return m_CellId; }
        }

        public bool IsCellRevealed()
        {
            return m_CellIsRevealed;
        }

        public bool HaveValue()
        {
            return m_CellId != null;
        }

        public bool CompareCellValue(Cell i_DiffrentCell)
        {
            return  m_CellId == i_DiffrentCell.CellValue;
        }
    }
}
